﻿using System.ComponentModel;

namespace CSNN.GUI
{
    /// <summary>
    /// Обозреваемый класс счетчика нейронов в слое сети для DataGrid
    /// </summary>
    public class NeuronsInLayer : INotifyPropertyChanged
    {
        private int _neurons;

        public event PropertyChangedEventHandler PropertyChanged;

        public NeuronsInLayer(int Count)
        {
            _neurons = Count;
        }

        public int Neurons
        {
            get { return _neurons; }
            set
            {
                _neurons = value;
                this.NotifyPropertyChanged("Neurons");
            }
        }

        private void NotifyPropertyChanged(string name)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(name));
        }
    }
}
